
/*****************************************************************************
 *
 * 作   者: 马婷婷 * 创建时间: 2020/12/15 15:54:56 *
 * Copyright (C) 2008 - 鹏业软件公司
 *
 *****************************************************************************/

import {DataPacket, NorDataList} from 'pengesoft-ng-lib';
import {Employee} from './employee.domain';

/**
// <<<<<<< HEAD
 *
 */
export class EmployeeDto extends DataPacket {
  Employee: Employee; // employee
  JobName: string;
  DeptName: string;

  constructor(options: {
    Employee?: Employee;
    JobName?: string;
    DeptName?: string;
  } = {}) {
    super();
    this.Employee = new Employee(options?.Employee);
    this.JobName = options.JobName || '';
    this.DeptName = options.DeptName || '';
// =======
//  *
//  */
// export class EmployeeDto extends DataPacket {
//   employee: Employee; // employee
//   jobName: string;
//   deptName: string;
//
//   constructor(options: {
//     employee?: Employee;
//     jobName?: string;
//     deptName?: string;
//   } = {}) {
//     super();
//     this.employee = new Employee(options?.employee);
//     this.jobName = options.jobName || '';
//     this.deptName = options.deptName || '';
// >>>>>>> 114a0271d9ae48d67f42c6a79764287a47013b8b
  }
}

/**
 * 列表
 */
export class EmployeeDtoList extends NorDataList<EmployeeDto> {

  constructor(options: {
    _Items?: Array<EmployeeDto>
  } = {}) {
    super();
    if (options._Items) {
      for (const item of options._Items) {
        this.append(new EmployeeDto(item));
      }
    }
  }
}
